<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js">
<!--<![endif]-->

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>企业微信管理后台</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../../css/reset.css">
    <link rel="stylesheet" href="../../js/layui/css/layui.css">
    <link rel="stylesheet" href="../../js/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="../../js/bootstrap/js/bootstrap-table-master/bootstrap-table.min.css">
    <link rel="stylesheet" href="../../css/fonts.css">
    <link rel="stylesheet" href="../../css/main.css">
</head>

<body>
    <!--[if lt IE 7]>
            <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="#">upgrade your browser</a> to improve your experience.</p>
        <![endif]-->
    <div class="user_manager_page" id="login_data">
        <div class="left_wrapper">
            <div class="title">选择组织架构</div>
            <div class="protree_wrapper">
                <div class="protree_container"></div>
            </div>
        </div>
        <div class="right_wrapper">
            <div class="title selected_dep_value">长沙峰之道（3人）</div>
            <div class="organizational_section">
                <div class="organizational_wrapper">
                    <div class="add_user_btn danger-bg">新增成员</div>
                </div>
            </div>
            <div class="screen_wrapper">
                <form class="layui-form user_manager_form">
                    <div class="layui-form-item">
                        <label class="layui-form-label">姓名</label>
                        <div class="layui-input-block">
                            <input class="layui-input" name="cus_name" type="text" placeholder="请输入姓名">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">职位</label>
                        <div class="layui-input-block">
                            <select name="role">
                                <option value="全部">全部</option>
                                <option value="SA">SA</option>
                                <option value="CR">CR</option>
                                <option value="车间技术人员">车间技术人员</option>
                            </select>
                        </div>
                    </div>
                    <button class="layui-btn danger-bg search_btn" lay-submit lay-filter="search_btn">查询</button>
                </form>
            </div>
            <div class="table-wrapper">
                <table class="layui-table" id="user_table">
                    <thead>
                        <tr>
                            <th class="avatar">头像</th>
                            <th class="name">姓名</th>
                            <th class="role">职位</th>
                            <th class="sex">性别</th>
                            <th class="phone">电话</th>
                            <th class="depart">部门</th>
                            <th class="operation">操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td class="avatar">
                                <img src="../../images/test.JPG" alt="">
                            </td>
                            <td class="user_name">刘毅华</td>
                            <td class="user_role">SA</td>
                            <td class="user_sex">男</td>
                            <td class="user_phone">18975157865</td>
                            <td class="user_organization"
                                data-organization="{id: 1,name: '长沙峰之道',pid: 2,department: true,Useful: true}">长沙峰之道
                            </td>
                            <td>
                                <span class="edit" data-id="0">修改</span>
                                <span class="delete" data-id="0">删除</span>
                                <span class="cancel_manager" data-id="0" data-manager="true">取消管理员</span>
                            </td>
                        </tr>
                        <tr>
                            <td class="avatar">
                                <img src="../../images/test.JPG" alt="">
                            </td>
                            <td class="user_name">赵虹蕊</td>
                            <td class="user_role">SA</td>
                            <td class="user_sex">女</td>
                            <td class="user_phone">13898291929</td>
                            <td class="user_organization"
                                data-organization="{id: 3,name: '君臣国度',pid: 2,department: true,Useful: true}">君臣国度</td>
                            <td>
                                <span class="edit" data-id="1">修改</span>
                                <span class="delete" data-id="1">删除</span>
                                <span class="set_manager" data-id="1" data-manager="false">设为管理员</span>
                            </td>
                        </tr>
                        <tr>
                            <td class="avatar">
                                <img src="../../images/test.JPG" alt="">
                            </td>
                            <td class="user_name">吕海洋</td>
                            <td class="user_role">SA</td>
                            <td class="user_sex">女</td>
                            <td class="user_phone">15607399829</td>
                            <td class="user_organization"
                                data-organization="[{id: 1,name: '长沙峰之道',pid: 2,department: true,Useful: true}]">长沙峰之道
                            </td>
                            <td>
                                <span class="edit" data-id="2">修改</span>
                                <span class="delete" data-id="2">删除</span>
                                <span class="set_manager" data-id="2" data-manager="false">设为管理员</span>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
            <div id="paging" style="margin-right: 20px;"></div>
        </div>
    </div>

    <!-- 新增用户Modal -->
    <div class="modal fade normal_modal" id="addUserModal" tabindex="-1" role="dialog"
        aria-labelledby="addUserModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <form class="layui-form">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="addUserModalLabel">新增用户</h4>
                    </div>
                    <div class="modal-body">
                        <div class="layui-form-item">
                            <label class="layui-form-label">姓名</label>
                            <div class="layui-input-block">
                                <input type="text" name="add_user_name" required lay-verify="required"
                                    placeholder="请输入用户姓名" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">职位</label>
                            <div class="layui-input-block">
                                <select name="add_user_role">
                                    <option value="SA">SA</option>
                                    <option value="CR">CR</option>
                                    <option value="车间技术人员">车间技术人员</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">性别</label>
                            <div class="layui-input-block">
                                <input type="radio" name="add_user_sex" value="男" title="男" checked>
                                <input type="radio" name="add_user_sex" value="女" title="女">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">电话号码</label>
                            <div class="layui-input-block">
                                <input type="text" name="add_user_phone" required lay-verify="required"
                                    placeholder="请输入电话号码" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                        <button type="button" class="btn danger-bg" lay-submit lay-filter="addUserSubmit">保存</button>
                    </div>
                </form>
            </div>
        </div>
    </div>

    <!-- 修改用户Modal -->
    <div class="modal fade normal_modal" id="editUserModal" tabindex="-1" role="dialog"
        aria-labelledby="editUserModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <form class="layui-form">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="editUserModalLabel">修改用户</h4>
                    </div>
                    <div class="modal-body">
                        <input type="hidden" name="edit_user_id" value="">
                        <!-- 2020-02-14 11:38 start -->
                        <div class="layui-form-item" id="edit_user_organization_is_show" style="display: none;">
                            <label class="layui-form-label">组织架构</label>
                            <div class="layui-input-block edit_user_select_orizination_block">
                                <div class="edit_user_select_orizination">选择组织架构</div>
                                <div class="edit_user_selected_orizination" id="edit_user_selected_orizination">已选：
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item" id="edit_user_logo_is_show" style="display: none;">
                            <label class="layui-form-label">目前标签</label>
                            <div class="edit_user_have_logo_wrapper">
                                <div class="logo_item">标签一</div>
                            </div>
                            <label class="layui-form-label text">修改为</label>
                            <div class="layui-input-block edit_user_logo_block">
                                <select name="edit_user_logo" id="edit_user_logo" lay-filter="edit_user_logo">
                                    <option value="标签一">标签一</option>
                                    <option value="标签二">标签二</option>
                                    <option value="标签三">标签三</option>
                                </select>
                            </div>
                        </div>
                        <!-- 2020-02-14 11:38 end -->
                        <div class="layui-form-item">
                            <label class="layui-form-label">姓名</label>
                            <div class="layui-input-block">
                                <input type="text" name="edit_user_name" required lay-verify="required"
                                    placeholder="请输入用户姓名" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">职位</label>
                            <div class="layui-input-block">
                                <select name="edit_user_role" id="edit_user_role">
                                    <option value="SA">SA</option>
                                    <option value="CR">CR</option>
                                    <option value="车间技术人员">车间技术人员</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">性别</label>
                            <div class="layui-input-block">
                                <input type="radio" name="edit_user_sex" value="男" title="男" checked>
                                <input type="radio" name="edit_user_sex" value="女" title="女">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">电话号码</label>
                            <div class="layui-input-block">
                                <input type="text" name="edit_user_phone" required lay-verify="required"
                                    placeholder="请输入电话号码" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                        <button type="button" class="btn danger-bg" lay-submit lay-filter="editUserSubmit">修改</button>
                    </div>
                </form>
            </div>
        </div>
    </div>


    <!-- 修改用户组织架构模态框 -->
    <div class="modal fade normal_modal" id="edit_user_organizational_modal" tabindex="-1" role="dialog"
        aria-labelledby="edit_user_organizational_modal_label">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                            aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="edit_user_organizational_modal_label">组织架构</h4>
                </div>
                <div class="modal-body">
                    <div class="select_person_wrapper">
                        <div class="left_wrapper">
                            <div class="edit_user_protree_container"></div>
                        </div>
                        <div class="right_wrapper">
                            <div class="title">组织架构</div>
                            <div class="selected">
                                <div class="department_members selected_department" id="edit_user_selected_department">

                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-primary" id="edit_user_submit_dep_member">确定</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                </div>
            </div>
        </div>
    </div>
    <!-- 修改用户组织架构模态框 -->

    <script src="../../js/jquery-3.3.1.min.js"></script>
    <script src="../../js/layui/layui.js"></script>
    <script src="../../js/bootstrap/js/bootstrap.min.js"></script>
    <script src="../../js/bootstrap/js/bootstrap-table-master/bootstrap-table.min.js"></script>
    <!-- 树形结构 -->
    <script src="../../js/proTree.js"></script>
    <script>
        //后台传入的 标题列表
        var arr = [
            {
                id: 1,
                name: "长沙峰之道",
                pid: 2,
                department: true,
                Useful: true
            },
            {
                id: 2,
                name: "长沙沃邦",
                pid: 0,
                department: true,
                Useful: true
            },
            {
                id: 3,
                name: '君臣国度',
                pid: 2,
                department: true,
                Useful: true
            }
        ];
        // 实例化表单
        layui.use('form', function () {
            var form = layui.form;
            layui.use('layer', function () {
                var layer = layui.layer
                // 店铺选择
                form.on('select(shopSelect)', function (data) {
                    let shopId = data.value // 选择的店铺shopid
                })
                // 组织架构 用户筛选查询按钮
                form.on('submit(search_btn)', function (data) {
                    console.log(data.field)
                    let cusName = data.field.cus_name
                    let role = data.field.role
                    return false
                })

                // 标签 用户筛选查询按钮
                form.on('submit(logo_search_btn)', function (data) {
                    console.log(data.field)
                    let cusName = data.field.logo_cus_name
                    let role = data.field.logo_role
                    return false
                })

                // 2020-02-14 start
                // 新增用户打开modal
                $(".add_user_btn").click(function () {
                    $("#addUserModal").modal('show')
                    $("input[name=add_user_name]").val('')
                    $("input[name=add_user_phone]").val('')
                    add_user_depSelected = []
                })

                // 新增用户modal确认
                form.on('submit(addUserSubmit)', function (data) {
                    // initDepList 为当前选中的组织架构 里面包含(id,name,department,useful)的值
                    let add_user_name = data.field.add_user_name
                    let add_user_role = data.field.add_user_role
                    let add_user_sex = data.field.add_user_sex
                    let add_user_phone = data.field.add_user_phone

                    //请求ajax
                    //ajax成功后关闭modal
                    $("#addUserModal").modal('hide')
                })
                // 2020-02-14 end

                // 2020-02-14 start
                // 组织架构 修改用户
                $("#user_table tbody tr").on('click', '.edit', function () {
                    let id = $(this).attr('data-id')
                    let user_name = $(this).parent().siblings('.user_name').text()
                    let user_role = $(this).parent().siblings('.user_role').text()
                    let user_sex = $(this).parent().siblings('.user_sex').text()
                    let user_phone = $(this).parent().siblings('.user_phone').text()
                    let user_organization = eval('(' + $(this).parent().siblings('.user_organization').attr('data-organization') + ')')
                    console.log(id, user_name, user_role, user_sex, user_phone, user_organization)
                    $("#editUserModal").modal('show')
                    $("#edit_user_organization_is_show").show()
                    $("#edit_user_logo_is_show").hide()
                    $("input[name=edit_user_name]").val(user_name)
                    $("input[name=edit_user_id]").val(id) // 用户id
                    $("#edit_user_role").find("option[value=" + user_role + "]").prop("selected", true);
                    form.render('select');
                    $("input[name=edit_user_sex]").each(function () {
                        if ($(this).val() == user_sex) {
                            $(this).prop('checked', true)
                        } else {
                            $(this).prop('checked', false)
                        }
                    })
                    form.render('radio');
                    $("input[name=edit_user_phone]").val(user_phone)
                    $("#edit_user_selected_orizination").text('已选：' + user_organization.name)
                    // 2020-02-27 start
                    edit_user_depSelected = [user_organization]
                    // 2020-02-27 end
                    $("#edit_user_selected_orizination").attr('data-organization', JSON.stringify(user_organization))
                })
                // 2020-02-14 end


                // 2020-02-14 start
                // 修改用户modal确认
                form.on('submit(editUserSubmit)', function (data) {
                    let edit_user_id = $('input[name=edit_user_id]').val()
                    let edit_user_name = data.field.edit_user_name
                    let edit_user_role = data.field.edit_user_role
                    let edit_user_sex = data.field.edit_user_sex
                    let edit_user_phone = data.field.edit_user_phone
                    let edit_user_logo = data.field.edit_user_logo
                    console.log(edit_user_id, edit_user_name, edit_user_role, edit_user_sex, edit_user_phone, edit_user_logo)
                    //请求ajax
                    //ajax成功后关闭modal
                    $("#editUserModal").modal('hide')
                })
                // 2020-02-14 end

                // 组织架构 删除用户
                $("#user_table tbody tr").on('click', '.delete', function () {
                    let id = $(this).attr('data-id') // 用户id
                    let user_name = $(this).parent().siblings('.user_name').text() // 用户姓名
                    layer.confirm('确认删除' + user_name + '吗？', {
                        btn: ['取消', '确认'] //按钮
                    }, function (index) {
                        layer.close(index)
                    }, function () {
                        layer.msg('删除成功')
                    });
                })

                // 组织架构 设为管理员
                $("#user_table tbody tr").on('click', '.set_manager', function () {
                    let id = $(this).attr('data-id') // 用户id
                    // 请求ajax将此id用户设为管理员

                    layer.msg('设置成功')
                    $(this).attr('class', 'cancel_manager')
                    $(this).text('取消管理员')
                })
                // 组织架构 取消管理员
                $("#user_table tbody tr").on('click', '.cancel_manager', function () {
                    let id = $(this).attr('data-id') // 用户id
                    // 请求ajax将此id用户设为管理员

                    layer.msg('设置成功')
                    $(this).attr('class', 'set_manager')
                    $(this).text('设为管理员')
                })

                // 组织架构 表格分页
                layui.use('laypage', function () {
                    var laypage = layui.laypage;

                    //执行一个laypage实例
                    laypage.render({
                        elem: 'paging',
                        limit: 5,
                        theme: '#E51C23',
                        count: 20, //数据总数，从服务端得到
                        jump: function (obj, first) {
                            //obj包含了当前分页的所有参数，比如：
                            console.log(obj.curr); //得到当前页，以便向服务端请求对应页的数据。
                            console.log(obj.limit); //得到每页显示的条数

                            //首次不执行
                            if (!first) {
                                //do something
                            }
                        }
                    });
                });

                // 标签 表格分页
                layui.use('laypage', function () {
                    var laypage = layui.laypage;

                    //执行一个laypage实例
                    laypage.render({
                        elem: 'logo_paging',
                        limit: 5,
                        theme: '#E51C23',
                        count: 20, //数据总数，从服务端得到
                        jump: function (obj, first) {
                            //obj包含了当前分页的所有参数，比如：
                            console.log(obj.curr); //得到当前页，以便向服务端请求对应页的数据。
                            console.log(obj.limit); //得到每页显示的条数

                            //首次不执行
                            if (!first) {
                                //do something
                            }
                        }
                    });
                });

                // 循环组织架构数组 默认选中的为组织架构最上级
                var initDepList = {}
                for (let i = 0; i < arr.length; i++) {
                    if (arr[i].pid == 0) {
                        initDepList = arr[i]
                    }
                }
                // 拿到最上级的name 和 人数 再赋值表格数据
                $(".selected_dep_value").text(initDepList.name + '（3人）')
                console.log('initDepList', initDepList)
                // 默认表格数据 根据initDepList.id来ajax获取
                // $.ajax({
                //     url: '',
                //     data: {},
                //     success() {},
                //     fail() {}
                // })

                //标题的图标是集成bootstrap 的图标  更改 请参考bootstrap的字体图标替换自己想要的图标
                $(".protree_container").ProTree({
                    arr: arr,
                    close: false,
                    clickStyle: true,
                    simIcon: "iconfont icon-wenjianjia", //单个标题字体图标 不传默认glyphicon-file
                    mouIconOpen: "iconfont icon-wenjianjia1", //含多个标题的打开字体图标  不传默认glyphicon-folder-open
                    mouIconClose: "iconfont icon-wenjianjia", //含多个标题的关闭的字体图标  不传默认glyphicon-folder-close
                    callback: function (id, name, pid, department, useful) {
                        initDepList = {
                            id: parseInt(id),
                            name,
                            pid: parseInt(pid),
                            department,
                            Useful: useful
                        }
                        console.log('initDepList2', initDepList)
                        $(".selected_dep_value").text(name + '（3人）') // 选中的组织架构 以及 它名下的人数
                        // id 为当前点击id，name为当前点击的组织名称
                        // 点击请求该组织架构中的人数

                    }
                });

                // 拿到需要发送的部门、成员列表
                $("#submit_dep_member").click(function () {
                    console.log(depSelected)
                    let html = "";
                    for (let i = 0; i < depSelected.length; i++) {
                        html += `<span class="item">${depSelected[i].name}</span>`;
                    }
                    $("#selected_list").html(html);
                    $("#organizational_modal").modal("hide");
                    $("#selected_organization").show();
                });

                // 点击标签切换class
                $(".nav_tab_wrapper").on('click', '.tab_item', function () {
                    $(this).addClass('active').siblings().removeClass('active')
                    if ($(this).text() == '组织架构') {
                        $(".organizational_section").show()
                        $(".logo_section").hide()
                    } else {
                        $(".organizational_section").hide()
                        $(".logo_section").show()
                    }
                })

                var logo_id = 0 //默认logo id
                // ajax拿到默认的成员表格数据

                // 标签内的标签筛选
                $(".logo_item").on('click', 'ul li', function () {
                    $(this).addClass('active').siblings().removeClass('active').parent().parent().siblings('.logo_item').find('ul li').removeClass('active')
                    logo_id = $(this).attr('data-id')
                    console.log(logo_id)
                    // 取到id后 do something id有一个默认值 
                })

                // 2020-02-27 start
                var edit_user_depSelected = []; // 修改用户选择的组织架构
                //标题的图标是集成bootstrap 的图标  更改 请参考bootstrap的字体图标替换自己想要的图标
                $(".edit_user_protree_container").ProTree({
                    arr: arr,
                    close: true,
                    simIcon: "iconfont icon-wenjianjia", //单个标题字体图标 不传默认glyphicon-file
                    mouIconOpen: "iconfont icon-wenjianjia1", //含多个标题的打开字体图标  不传默认glyphicon-folder-open
                    mouIconClose: "iconfont icon-wenjianjia", //含多个标题的关闭的字体图标  不传默认glyphicon-folder-close
                    callback: function (id, name, pid, department, useful) {
                        let data = {
                            id,
                            name,
                            pid: parseInt(pid),
                            department,
                            Useful: useful
                        };
                        if (department == 'true' || department == true) {
                            data.id = parseInt(id)
                            data.department = true
                        } else if (department == 'false' || department == false) {
                            data.department = false
                        }
                        if (useful == 'true') {
                            data.Useful = true
                        } else {
                            data.Useful = true
                        }
                        if (pid != 0) {
                            if (edit_user_depSelected.length > 0) {
                                for (let i = 0; i < edit_user_depSelected.length; i++) {
                                    if (edit_user_depSelected[i].id == data.id) {
                                        layer.msg('已存在该部门')
                                        return false
                                    }
                                }
                            }
                            edit_user_depSelected.push(data);
                            $("#edit_user_selected_department").append(`
                        <div class="dep_item">
                            <i class="iconfont icon-wenjianjia"></i>
                            <span data-id="${data.id}" data-pid="${data.pid}" data-dep="${data.department}" data-useful="${data.Useful}">${data.name}</span>
                            <i class="iconfont icon-shanchu delete_dep_mem"></i>
                            </div>
                        `);
                        }
                    }
                });
                // 2020-02-27 end

                // 2020-02-27 start
                // 删除部门
                $(".department_members").on("click", ".delete_dep_mem", function () {
                    let id = $(this)
                        .siblings("span")
                        .attr("data-id");
                    let dep = $(this)
                        .siblings("span")
                        .attr("data-dep");
                    $(this)
                        .parent()
                        .remove();
                    for (let i = 0; i < edit_user_depSelected.length; i++) {
                        if (id == edit_user_depSelected[i].id) {
                            edit_user_depSelected.splice(i, 1);
                            break;
                        }
                    }
                });
                // 2020-02-27 end

                // 2020-02-27 start
                // 修改用户 点击组织架构选择
                $(".edit_user_select_orizination").click(function () {
                    $("#edit_user_organizational_modal").modal('show')
                    let html1 = "";
                    for (let i = 0; i < edit_user_depSelected.length; i++) {
                        html1 += `
                        <div class="dep_item">
                            <i class="iconfont icon-wenjianjia"></i>
                            <span data-id="${edit_user_depSelected[i].id}" data-pid="${edit_user_depSelected[i].pid}" data-dep="${edit_user_depSelected[i].department}" data-useful="${edit_user_depSelected[i].Useful}">${edit_user_depSelected[i].name}</span>
                            <i class="iconfont icon-shanchu delete_dep_mem"></i>
                            </div>
                        `;
                    }
                    $("#edit_user_selected_department").html(html1);
                })
                // 2020-02-27 end

                // 拿到需要发送的部门、成员列表
                $("#edit_user_submit_dep_member").click(function () {
                    console.log(edit_user_depSelected)
                    let html = "";
                    for (let i = 0; i < edit_user_depSelected.length; i++) {
                        html += `${edit_user_depSelected[i].name},`;
                    }
                    html = html.substring(0, html.length - 1)
                    $("#edit_user_selected_orizination").html(`<span>已选：${html}</span>`);
                    $("#edit_user_organizational_modal").modal("hide");
                    $("#edit_user_selected_orizination").show();
                });
                // 2020-02-14 11:38 end
            })

        });
    </script>
</body>

</html>